var app = new Vue({
	el: "#app",
	data: {
		current_word: "",
		words: []
	},
	methods: {
		add_word: function() {
			if (!this.current_word) {
				alert("请输入单词");
				return;
			}
			var that =this;
			static_ajax.post("/wordbook/add")
				.data({
					id: "13A40FE6-B619-4155-A44B-288FBEFCFDDD",
					word: this.current_word
				})
				.success(function (e) {
					that.words.reverse();
					that.words.push(e);
					that.words.reverse();
				})
				.ajax();
			this.current_word = "";
		},
		delete_word:function (word) {
			alert(word);
		}
	}
});